package com.blank.task18;

import java.util.List;

public class SetStudent {
    public static void set(int stuNum, String name, int age,Student stu)  {
        try {
            stu.setStuNumber(stuNum);
        } catch (StuNumException e) {
            e.printStackTrace();
        }
        try {
            stu.setAge(age);
        } catch (AgeException e) {
            e.printStackTrace();
        }
        stu.setName(name);
        System.out.println("修改成功!");
    }
}
